Traditionally, digital media data has been distributed as a stream; for example, video data may be distributed using a serial digital interface (SDI) standard for streaming data. A characteristic of a stream of data is that it provides sequential access to the data that makes it up, and once a given piece of data has been provided by the stream, it cannot be requested again—the stream has no “memory”. The use of a stream to transmit media data is particularly appropriate where the media data is of a live event, such as a sporting or news event, in which case the pieces of data making up the stream only become available to be transmitted as they occur in real time.
However, it has become desirable to provide media data as a file, for example as an MXF (Material eXchange Format) file, for reasons of cost and convenience (amongst other things). A characteristic of a file is that it allows random access; once a file is made available within a file system, a request may be made to the file system for any arbitrary piece of data from anywhere within the file.
One example of the use of a file to transmit media data is the transmission of a television programme over the Internet. This is now described with reference to FIG. 1. First, a file T corresponding to a programme is provided. The file T is then converted into a file T′, which is a file of a form suitable for transmitting over the Internet. This may for example involve transcoding the file T into a different format and/or quality. The conversion of the file is indicated by the bar C.
As noted above, the provision of the programme as a file T means that random access to any piece of data within the file T may be required. Consequently, the conversion process C expects the entire file T to be available within the file system prior to the conversion process beginning. Requiring the entire file T to be available introduces a large time overhead for the availability of the file T′ for transmitting over the Internet, as conversion can only begin once the entire file T is available, which consequently means that the programme the file represents must have finished. This is a particular issue when the programme is of a live event, as it is not then possible to obtain the file T ahead of time.
One partial solution to reducing the time overhead is to reduce the time taken by the conversion process C, by providing additional computing power. However, even if unlimited computing power were available, with the result that the time for conversion was effectively reduced to zero, the necessity to wait until the programme had finished before conversion could begin would still remain.
While random access to data from anywhere within a file is allowed, in order to avoid the delay associated with waiting for the writing of a file to complete, file systems will commonly allow data to be read from a file while its content is still being written to the file system, even though this means that the entire file is not yet available.
This are however two problems with this. First, if a request is made for data from the file that has not yet been written to the file system, the file system will return false data, for example blank padding data or garbage data. Second, it is a characteristic of writing to a file in a file system that any part of the file can be written to. This means that while the writing is in progress, data previously read from the file may overwritten. As a result, with known file systems it is not safe to begin reading from a file before it has been completely written to the file system, as until that has occurred any data read from the file cannot be trusted to be correct.
Specialised file formats are known which are intended to be read from while still being written to. Such files consist of a series of segments each containing an index indicating where data can be found in that segment. Thus, if data is written to the file sequentially it can be read sequentially without later parts of the file needing to be referred to. However, the use of these requires that both the writing and the reading of the file occur in a well-behaved manner, which cannot be relied upon. Further, it would be advantageous to provide a solution that can be used with existing devices and the standard file formats they use.
Another solution is to modify the device that implements the conversion process so that it is able to accept streamed data rather than a file. However, again it would be advantageous to provide a solution that can be used with existing devices and the standard file formats they use.
The present invention seeks to mitigate the above-mentioned problems. Alternatively and/or additionally, the present invention seeks to provide an improved file system that provides essence data for a media file in a way that does not require the contents of the entire file to be available before any file data can be provided.